"
A CheckListSettingDeclaration is a setting for which the value domain is a list. Each element of the list is an instance of FixedSettingValue. If domainValues is set, then the list of valid values is constant (initialized at declaration time). Instead, if getter is set, then the setting list is always dynamically computed. See SettingManager comment for more explanations. 

Instance Variables

"
Class {
	#name : 'PickOneSettingDeclaration',
	#superclass : 'MultipleSettingDeclaration',
	#category : 'System-Settings-Core-Base',
	#package : 'System-Settings-Core',
	#tag : 'Base'
}

{ #category : 'user interface' }
PickOneSettingDeclaration >> content [
	^ self domainValues
		detect: [ :setting | setting realValue = self realValue ]
		ifFound: [ :setting | setting name ]
		ifNone: [ 'nil' ]
]

{ #category : 'user interface' }
PickOneSettingDeclaration >> defaultValue [
	^ self default value ifNil: [self domainValues first realValue]
]

{ #category : 'user interface' }
PickOneSettingDeclaration >> index [
	self realValue ifNil: [self realValue: self default].
	^ self domainValues indexOf: (self domainValues detect: [:dv | dv realValue = self realValue] ifNone: [^ 0])
]

{ #category : 'user interface' }
PickOneSettingDeclaration >> index: anInteger [
	self realValue: (self domainValues at: anInteger) realValue
]
